<?php

/*
#-----------------------------------------------------------#
#
#  File name: op.php
#  File description: operations file
#  Built on: 05.10.2008
#  Last modified date: 05.10.2008
#  Last modified by: John
#
#-----------------------------------------------------------#
*/

require_once ( 'parseEngine.php' );
require_once ( 'logEngine.php' );
require_once ( 'tarantulaEngine.php' );
	
$tarantula = new Tarantula;
$log = new logEngine;

$done = '<h1 align="center">Request processed. <a href="../index.php">Click here</a> to get back.</h1>';
	
	switch ( $_GET['mod'] ) {
		case 'submited':
			$url = $_GET['url'];
			$tarantula -> addParse ( $url );
			$log -> add ( $url, 'done' );
			echo $done;
		break;
		
		case 'junk':
			$url = $_GET['url'];
			$tarantula -> addJunk ( $url );
			$log -> add ( $url, 'junk' );
			echo $done;
		break;
		
		default:
			die ( '-1' );
		break;
	}
	
?>